import request from './request'

export const analyticsApi = {
  // 获取开始时间趋势数据
  getStartTimeTrend(studentId) {
    return request.get('/analytics/start-time-trend', { params: { studentId } })
  },

  // 获取完成时间趋势数据
  getCompletionTimeTrend(studentId) {
    return request.get('/analytics/completion-time-trend', { params: { studentId } })
  },

  // 获取月度日历数据
  getCalendarData(studentId, year, month) {
    return request.get(`/analytics/calendar/${year}/${month}`, { params: { studentId } })
  },

  // 获取作业完成记录
  getHomeworkRecords(studentId, year, month) {
    return request.get('/analytics/homework-records', {
      params: { studentId, year, month }
    })
  }
}